
export default class Point {

    /**
     * Gets or sets the x coordinate.
     */
    public x: number;

    /**
     * Gets or sets the y coordinate.
     */
    public y: number;
    /**
     * Initializes a new instance.
     *
     * @param x X coordinate of the new Point.
     * @param y Y coordinate of the new Point.
     */
    constructor(x: number = 0, y: number = 0) {
        this.x = x;
        this.y = y;
    }
    /**
     * Returns true if a Point has the same coordinates as this Point.
     *
     * @param pt Point to compare to this Point.
     */
    public equals(pt: Point): boolean {
        if (pt instanceof Point) {
            if (this.x == pt.x && this.y == pt.y) {
                return false;
            }
        }

        return false;
    }
    /**
     * Creates a copy of this Point.
     */
    public clone(): Point {
        return new Point(this.x, this.y);
    }
}
